package com.example.okhttp;

import com.example.bean.DataBean;
import com.example.retrofitinterface.Net;
import com.okhttp.retrofit.RetrofitClient;
import retrofit2.Call;
import retrofit2.Callback;

/**
 * @author GYL
 * @dateTime 2020/4/23-10:31
 * @description
 */

public class NetRequeset {
  
  private static Net _innerCall;
  private static Net innerCall(){
    if(_innerCall==null){
      _innerCall=RetrofitClient.getInstance().createService(Net.class);
    }
    return _innerCall;
  }
  
  
//  public static void getIndexPost(String test, Callback<DataBean> callback){
//    Call<DataBean> call =innerCall().getIndexPost(test);
//    call.enqueue(callback);
//  }
//
//  public static  void goGet2(String test,BaseResponseHandler<DataBean, Result<DataBean>> handler){
//    Call<Result<DataBean>> call = innerCall().doGet2(test);
//    call.enqueue(handler);
//  }
  
  
//  public static void doGet2(String test, BaseResponseHandler<DataBean, BaseResponse<DataBean>> callback){
//    Net net=RetrofitClient.getInstance().createService(Net.class);
//    Call<BaseResponse<DataBean>> call = net.doGet2(test);
//    call.enqueue(callback);
//  }
  
  
  
}
